# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-www-lw2
_pkgname=WWW-LW2
pkgver=0.10
pkgrel=6
pkgdesc='WWW::LW2 - the module for easy and convenient use LW2.'
arch=('any')
url='https://metacpan.org/pod/release/PEARL/WWW-LW2-0.10/lib/WWW/LW2.pm'
license=('custom:unknown')
depends=('perl')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/P/PE/PEARL/$_pkgname-$pkgver.tar.gz")
sha512sums=('29e53712742b806f9a21f25178620e7bfb88ed28a71350760f7ef2595fa4dcabfc592f6c48bab9789726fde2d28d726d6ce82585cdfb0e82fd19a32bd8342f1c')

build() {
  cd $_pkgname

  PERL_USE_UNSAFE_INC=1 \
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd $_pkgname

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}

